import request from '@/utils/request'

// 查询自定义表单申请列表
export function listMyApply(query) {
  return request({
    url: '/oa/myApply/list',
    method: 'get',
    params: query
  })
}

// 查询自定义表单申请详细
export function getMyApply(id) {
  return request({
    url: '/oa/myApply/' + id,
    method: 'get'
  })
}

// 新增自定义表单申请
export function addMyApply(data) {
  return request({
    url: '/oa/myApply',
    method: 'post',
    data: data
  })
}

// 修改自定义表单申请
export function updateMyApply(data) {
  return request({
    url: '/oa/myApply',
    method: 'put',
    data: data
  })
}

// 删除自定义表单申请
export function delMyApply(id) {
  return request({
    url: '/oa/myApply/' + id,
    method: 'delete'
  })
}


// 撤销申请
export function cancelApplyInsId(id) {
    return request({
        url: '/oa/myApply/cancelApplyInsId/'+id,
        method: 'post'
    })
}

// 撤销申请
export function submitApply(id) {
    return request({
        url: '/oa/myApply/submitApply/'+id,
        method: 'post'
    })
}
